package treeMap.test2;

import java.util.TreeMap;

public class StuTest {
    public static void main(String[] args) {
        //创建单列TreeSet集合
        TreeMap<Student,String> ts = new TreeMap<>();
        //创建学生对象并添加
        Student s1 = new Student("jack", 19);
        Student s2 = new Student("tom", 22);
        Student s5 = new Student("atm", 22);
        Student s3 = new Student("mary", 24);
        Student s4 = new Student("jack", 19);
        ts.put(s1,"四川省");
        ts.put(s2,"四川省");
        ts.put(s3,"四川省");
        ts.put(s4,"四川省");
        ts.put(s5,"四川省");
        System.out.println(ts);
    }
}
